package com.cosina.game.robodefence.ui.view;

import com.cosina.game.robodefence.model.Finger;

import android.content.Context;
import android.widget.FrameLayout;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;

public class ViewPort extends FrameLayout{
	
	public ViewPort(Context context) {
		super(context);
		
		hsv = new HorizontalScrollView(context);
		
		hsv.setHorizontalScrollBarEnabled(false);
		vsv = new ScrollView(context);
		vsv.setVerticalScrollBarEnabled(false);
		
		
		LinearLayout linearLayout  = new LinearLayout(context);
		linearLayout.setOrientation(LinearLayout.VERTICAL);
		
		FrameLayout frameLayout = new FrameLayout(context);
		frameLayout.addView(new GroundView(context));
		frameLayout.addView(new EnemyView(context));
		linearLayout.addView(frameLayout);
		
		TextView tv = new TextView(context);
		tv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
		tv.setMinHeight(40);
		
		linearLayout.addView(tv);
		
		vsv.addView(linearLayout);
		hsv.addView(vsv);
		
		this.addView(hsv);
		Finger.listenerView = new GameInfoView(context);
		this.addView(Finger.listenerView);
	}
	public static HorizontalScrollView hsv;
	public static ScrollView vsv;
}
